package sk.tuke.android4all.messenger;

import java.util.ArrayList;
import java.util.List;

import sk.tuke.android4all.controls.CustomFragment;
import sk.tuke.android4all.listeners.SwipeListener;
import sk.tuke.android4all.services.Tts;
import android.app.Activity;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.database.Cursor;
import android.net.Uri; 
import android.os.Bundle;
import android.telephony.SmsManager;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnGenericMotionListener;
import android.view.View.OnTouchListener;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MainActivity extends Activity{
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_messenger);		
		this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
		
		FragmentTransaction t = getFragmentManager().beginTransaction();
        t.add(R.id.messages_container, new MenuFragment(this), MenuFragment.class.getName()).commit();
	}
	
	@Override
	public void onActivityResult(int requestCode, int resultCode,Intent data){
		if(resultCode == RESULT_OK){
			((CustomFragment) getFragmentManager().findFragmentByTag(data.getExtras().getString("caller"))).proceedReturnedResult(requestCode, resultCode, data);
		}
	}
}
